package kr.hkit.androidcomplete02;

import kr.hkit.androidcomplete02.ch11.Ch11_Amain;
import kr.hkit.androidcomplete02.ch12.Ch12_Amain;
import kr.hkit.androidcomplete02.ch13.Ch13_Amain;
import kr.hkit.androidcomplete02.ch14.Ch14_Amain;
import kr.hkit.androidcomplete02.ch15.Ch15_Amain;
import kr.hkit.androidcomplete02.ch16.Ch16_Amain;
import kr.hkit.androidcomplete02.ch17.ApplicationEx;
import kr.hkit.androidcomplete02.ch17.Ch17_Amain;
import kr.hkit.androidcomplete02.ch18.Ch18_Amain;
import kr.hkit.androidcomplete02.ch19.Ch19_Amain;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Toast;

public class ActivityMain extends Activity {
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);
		
		ApplicationEx app = (ApplicationEx) getApplication();
		Toast.makeText(this, "전역정보 " + app.getmMode(), Toast.LENGTH_SHORT).show();
	}
	
	public void mOnClick(View v){
		Intent intent = null;
		
		switch(v.getId()){
		case R.id.main_btn01:
			intent = new Intent(this, Ch11_Amain.class);
			break;
		case R.id.main_btn02:
			intent = new Intent(this, Ch12_Amain.class);
			break;
		case R.id.main_btn03:
			intent = new Intent(this, Ch13_Amain.class);
			break;
		case R.id.main_btn04:
			intent = new Intent(this, Ch14_Amain.class);
			break;
		case R.id.main_btn05:
			intent = new Intent(this, Ch15_Amain.class);
			break;
		case R.id.main_btn06:
			intent = new Intent(this, Ch16_Amain.class);
			break;
		case R.id.main_btn07:
			intent = new Intent(this, Ch17_Amain.class);
			break;
		case R.id.main_btn08:
			intent = new Intent(this, Ch18_Amain.class);
			break;
		case R.id.main_btn09:
			intent = new Intent(this, Ch19_Amain.class);
			break;
		}
		
		startActivity(intent);
	}
}
